home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / bbs / pg_logon / logon.txt < prev   
Text File  |  1992-06-18  |  5KB  |  76 lines

  1. '
  2. 'F6FBB "LOGON TEXT" UTILITY WITH AUTHORISATION RUTINE G6WHL @ GB7KLY 1992
  3. 'This program is specifically for use in an F6FBB v 5.14 BBS PG directory and
  4. 'allows authorised callsigns to add text to a {language}.ENT  bbs logon
  5. 'text file. It is intended for use by local ARS secretaries and the like to
  6. 'publicise club events on their local F6FBB packet BBS. (The prior agreement
  7. 'of the BBS sysop should be sought of course.) See also the "help" in program.
  8. 'SYSOPS:
  9. 'For this version of the LOGON program a file (LOGON.SYS) *may* exist in the
  10. 'DEFAULT directory (\FBB) which is expected to contain the callsigns of those
  11. 'persons who are authorised to use the LOGON program.(1 call/line-upper case)
  12. 'If LOGON.SYS does not exist ALL bbs users will have access. The compiled
  13. 'LOGON.EXE file should be placed in the PG directory and the bbs re-booted.
  14. 'As before, compile with almost anything except turbo basic HI. G6WHL @ GB7KLY
  15. c$ = COMMAND$                                   'Get users call+text etc.
  16. fil$ = "C:\FBB\SYSTEM\LANG\ENGLISH."            'Specify which language file
  17. i = INSTR(c$, "-")                              'Find end of callsign
  18. IF i = 0 THEN GOTO help                         'Not run from PG rutine!!
  19. cs$ = LEFT$(c$, i - 1)                          'Isolate callsign
  20. on error goto no.sys.file            'Maybe LOGON.SYS doesn't exist
  21. OPEN "i", #1, "logon.sys"            'Try to open sysop file (ERROR)
  22. while not eof(1)                'loop through callsigns    |
  23. line input#1,s$                    'read a callsign           |
  24. if s$=cs$ then close#1:goto sysop        'This OM is authorised >>> |
  25. wend                        'callsign doesn't match.   |
  26. PRINT "Prior authorisation needed."        'Callsign not authorised   |
  27. END                        'Back to the bbs >>>>      |
  28. no.sys.file:                    'Can't open LOGON.SYS <----
  29. resume sysop                    'continue with program
  30. sysop:                        'Current user is authorised
  31. on error goto 0                    'remove old error trap
  32. c = 1                                           'Initialise character counter
  33. s = 0                                           'Initialise a space counter
  34. findtxt:                                        'find start of users text
  35. IF c = LEN(c$) THEN GOTO remove.entry           'Delete an existing entry
  36. IF MID$(c$, c, 1) = " " THEN s = s + 1          'Found start of a new word
  37. c = c + 1                                       'Increment character counter
  38. IF s < 4 THEN GOTO findtxt                      'Not found start of text yet
  39. 'The start of the users text has been found.
  40. OPEN "a", #1, fil$ + "ent"                      'Open file for appending
  41. PRINT #1, cs$; ":"; MID$(c$, c)                 'Append the new text
  42. PRINT "The following logon text has been recorded...."  'Report to user.
  43. PRINT cs$; ":"; MID$(c$, c)
  44. PRINT "Please send a LOGON command with no text to erase it later."
  45. END                                             'Back to the bbs >>>>
  46. remove.entry:
  47. e = 0                                           'Initialise erase flag.
  48. OPEN "i", #1, fil$ + "ent"                      'Open existing file
  49. OPEN "o", #2, fil$ + "$$$"                      'Create a new file
  50. WHILE NOT EOF(1)                                'Loop through entire file
  51. LINE INPUT #1, t$                               'and copy contents of old one
  52. IF LEFT$(t$, LEN(cs$)) <> cs$ THEN PRINT #2, t$ ELSE e = e + 1: PRINT t$
  53. WEND                                            'NOT de callsign(Count erases)
  54. CLOSE                                           'Close both files.
  55. IF e = 0 THEN KILL fil$ + "$$$": GOTO help      'Nowt to erase so offer help
  56. KILL fil$ + "ENT"                               'Get rid of old file
  57. NAME fil$ + "$$$" AS fil$ + "ENT"               'And rename the new file
  58. PRINT "The above text/s from "; cs$; " erased." 'Report to user
  59. END                                             'Back to the bbs >>>>
  60. help:
  61. PRINT "------------------------------------------------------------------------------"
  62. PRINT "The LOGON program allows users to add logon text to the BBS."
  63. PRINT ""
  64. PRINT "To use the logon text program you should send the following command to the BBS."
  65. PRINT "LOGON Emergency RAYNET meeting tonight 8:30 at Freds."
  66. PRINT "...and the line...."
  67. PRINT "{YOURCALLSIGN}:EMERGENCY RAYNET MEETING TONIGHT 8:30 AT FREDS."
  68. PRINT "...will greet BBS users when they log onto the system."
  69. PRINT
  70. PRINT "To cancel your logon text simply send a LOGON command to the BBS without text."
  71. PRINT "------------------------------------------------------------------------------"
  72. END                                                     'Back to the bbs >>>>
  73.  
  74. (Source G6WHL @ GB7KLY)
  75. (Downloaded from GB7BBS)
  76.